﻿<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title><?php echo $title; ?></title>
</head>
<body>	
	<div class="c-wrap">
	<div class="head">			
			<span>NGÀY CÔNG <img class="ent" src="http://localhost/qlc/media/images/6.png" alt=""></span>						
								
		</div>
	</div>
	<div class="myedit">
	<table>
		<tbody>				
			<ul style=" border-bottom: 1px solid #333333;">
				<li style="color:#000000; width: 50px">STT</li>
				<li class="divider1"></li>
				<li style="color:#000000; width: 150px">Tài khoản</li>
				<li class="divider1"></li>
				<li style="color:#000000; width: 270px">Họ tên</li>			
				<li class="divider1"></li>
				<li style="color:#000000; width: 150px">Nghỉ có phép</li>
				<li class="divider1"></li>
				<li style="color:#000000; width: 150px">Nghỉ không phép</li>		
				<li class="divider1"></li>				
				<li style="color:#000000; width: 100px">Ngày công</li>							
			</ul>				
			</tbody>			
		</table>
		<table>
		<tbody>	
		<?php 
			ob_start();
			require_once('db.php');
			$stt = 0 ;
			foreach ($item as $row){
				$stt++;
				$i = $row['id'];
				$sql = mysql_query("select * from persondailylog where PersonID = '$i'");
				$tong = mysql_num_rows($sql);				
				$a = mysql_query("update `bangluong` set `ngaycong` = '{$tong}' where id = '$i'");
				$sql1 = mysql_query("select * from bangluong where id = '$i'");
				$sql2 = mysql_query("select * from nghiphep where id = '$i'");
				$info = mysql_fetch_array($sql1);
				$inf = mysql_fetch_array($sql2);
								
				echo "<ul style='background: #FFFFFF'>";
				echo "<li class='' style='width: 50px;'>$stt</td>";
				
				echo "<li class='' style='width: 150px;'>$info[account]</a></li>";
				
				echo "<li class='' style='width: 270px;'>$info[name]</a></li>";
				
				echo "<li class='' style='width: 150px;'>$inf[cophep]</a></li>";
				
				echo "<li class='' style='width: 150px;'>$inf[khongphep]</a></li>";
				
				echo "<li class='' style='width: 100px;'>$info[ngaycong]</a></li>";
			
				echo "</ul>";			
			}
			ob_end_flush();
		?>	
		</tbody>			
	</table>
	</div>
</div>
</body>
</html>